#include "global.h"

Stock* Global::stockInstance=0;

Global::Global(QObject *parent) :
    QObject(parent)
{
}

void Global::setGlobalStock(Stock *s)
{
    stockInstance=s;
}

Stock *Global::getStockInstance()
{
    if(!stockInstance)
        stockInstance=new Stock(new Config(CFG_FILENAME),DB_FILENAME);
    return stockInstance;
}
